<template>
	<my-layout headerTitle="运输管理" :isback="true">
		<view class="transpotation-content">
			<view class="section" v-for="section in bannerList" :key="section.id">
				<view class="section-title">
					<view class="line"></view>
					{{section.title}}
				</view>

				<view class="banner">
					<view class="list" v-for="item in section.list" :key="item.id" @click="clickPage({title:section.title,id:section.id},item)">
						<image :src="`/static/transpotation/${item.img}`" mode="widthFix"></image>
						<view class="txt">
							{{item.title}}
						</view>
					</view>
				</view>
			</view>
		</view>
	</my-layout>
</template>

<script>
	export default {
		data() {
			return {
				bannerList: [{
					title: "我的订单",
					id: 1,
					list: [{
							title: "待接单",
							id: 1,
							img: "1.png"
						},
						{
							title: "待报销",
							id: 2,
							img: "2.png"
						},
						{
							title: "已完成",
							id: 3,
							img: "3.png"
						},
					],
				}, {
					title: "暂落箱",
					id: 2,
					list: [{
							title: "待接单",
							id: 1,
							img: "1.png"
						},
						{
							title: "待报销",
							id: 2,
							img: "2.png"
						},
						{
							title: "已完成",
							id: 3,
							img: "3.png"
						},
					],
				}, ],
			}
		},
		onLoad() {

		},
		methods: {
			clickPage(section,item) {
				uni.navigateTo({
					url: `/pages/transpotation-detail/index?params=${JSON.stringify({section,item})}`,
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.transpotation-content {
		height: 100%;
		background: #F6F6F6;
		padding: 24rpx;

		.section {
			width: 100%;
			background: #FFFFFF;
			border-radius: 24rpx 24rpx 24rpx 24rpx;
			padding: 0 24rpx;


			&+.section {
				margin-top: 20rpx;
			}

			.section-title {
				height: 88rpx;
				display: flex;
				align-items: center;
				border-bottom: 2rpx solid #ECECEC;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 28rpx;
				color: #000000;
				text-align: left;
				font-style: normal;
				text-transform: none;

				.line {
					width: 6rpx;
					height: 26rpx;
					background: #3F4DD4;
					border-radius: 0rpx 0rpx 0rpx 0rpx;
					margin-right: 10rpx;
				}
			}



			.banner {
				display: flex;


				.list {
					width: calc(100% / 3);
					height: 212rpx;
					display: flex;
					flex-direction: column;
					justify-content: center;
					align-items: center;

					image {
						width: 84rpx;
					}

					.txt {
						margin-top: 20rpx;
						font-family: PingFang SC, PingFang SC;
						font-weight: 400;
						font-size: 28rpx;
						color: #686868;
						text-align: left;
						font-style: normal;
						text-transform: none;
					}
				}
			}
		}
	}
</style>